package excel

import (
	"github.com/tealeg/xlsx"
	"strconv"
)

func testExcel() {
	tablePath := "E:\\Desktop\\新建文件夹\\登分表.xlsx"

	// 获取表格sheet
	table, _ := xlsx.OpenFile(tablePath)
	sheet := table.Sheets[0]

	// 缓存表格内容，key为学号，value为行号
	m := map[int]int{}
	for index, row := range sheet.Rows {
		number, err := strconv.Atoi(row.Cells[0].String())
		if err != nil {
			continue
		}
		m[number] = index
	}
}
